Occupancy sensors programmed to determine loss of lamp life as lamp is used

ABSTRACT

Programmable occupancy sensors that control the on/off operation of a fluorescent lamp automatically determine loss of lamp life as the lamp is used. The programmable occupancy sensors can provide lamp life status and can automatically alert a user when a lamp is nearing its end of life and should be replaced. The occupancy sensors are also programmable to automatically improve lamp life and energy savings by selecting an optimal time delay from among a number of selectable time delays at which to operate the sensor. The selection is based on an occupancy pattern sensed by the sensor over a given period of time. The optimal time delay, which prevents the lamp from turning off immediately after last sensing occupancy, extends lamp life by limiting the number of lamp off/on transitions, which shortens lamp life, in view of overall energy usage and lamp usage.

CROSS REFERENCE TO RELATED APPLICATION

This is a continuation of U.S. patent application Ser. No. 13/358,767,filed Jan. 26, 2012, now U.S. Pat. No. 8,237,540, which is acontinuation of U.S. patent application Ser. No. 12/192,520, filed Aug.15, 2008, now U.S. Pat. No. 8,111,131, the entire disclosure of each isincorporated by reference herein.

FIELD OF THE INVENTION

The invention relates to occupancy sensors. More particularly, theinvention relates to occupancy sensors programmed to automaticallydetermine loss of lamp life as a fluorescent lamp controlled by theoccupancy sensor is used.

BACKGROUND OF THE INVENTION

Lamps typically are replaced either according to a pre-determinedschedule or after they burn out. The pre-determined schedule is usuallya rough estimate of when lamps will be near their end of life based onthe lamp's expected usage and the lamp's published lamp life (defined inhours of operation). Neither replacement method is particularlydesirable. Replacing lamps according to a schedule may unnecessarilyincrease lamp replacement costs and environmental waste if the replacedlamps still have many hours of lamp life remaining. Replacing lampsafter they burn out causes at least some inconvenience and may result inhazardous or dangerous conditions until the lamps are replaced.Unfortunately, nothing is currently known that can automatically alert auser to a lamp's pending end of life based on actual usage of the lamp.

Occupancy sensors automatically control the operation of lights and areused to save energy and lamp life by turning off lights in areas thatare unoccupied. When the presence of one or more persons is detected bythe occupancy sensor, the sensor turns on or keeps on the lightscontrolled by the sensor. However, the lamp life of a fluorescent lampdecreases as the number of starts (i.e., off/on transitions) increases.That is, each off/on transition reduces the lamp's operating hours by asmall amount. Thus, if lights are turned off and then back on againafter too short a period of off time, more lamp life is lost by theaffect of the lights turning back on than is saved by the short offtime.

To help prevent lights from unnecessarily turning off and on toofrequently, occupancy sensors typically have a short time delay thatkeeps lights on after occupancy is last detected. Should an occupantreturn within the time delay, the lights will remain on, thus avoidingan off/on transition. However, this feature may not extend lamp life ifthe actual occupancy pattern does not conform to the time delay. Forexample, if occupants tend to leave and return just after expiration ofthe sensor's time delay, no off/on transitions are avoided and loss oflamp life is accelerated.

This time delay is programmable in some known occupancy sensors.However, nothing is currently known that can automatically select theoptimal time delay based on actual occupancy patterns. Thus, a user islikely to select a time delay based on a predicted occupancy pattern,which may or may not result in any lamp life savings.

In view of the foregoing, it would be desirable to be able to provide anoccupancy sensor that can be programmed to monitor and report lamp lifestatus to a user.

It would also be desirable to be able to provide an occupancy sensorthat can automatically select the optimal time delay based on an actualoccupancy pattern detected by the sensor.

SUMMARY OF THE INVENTION

In accordance with the invention, a programmable occupancy sensorautomatically determines loss of lamp life of a fluorescent lamp as thelamp is being used. An algorithm implemented in software or firmware andexecuting on preferably the sensor's microcontroller calculates lamploss taking into account the fluorescent lamp's actual hours ofoperation (i.e., actual on time) and the number of off/on transitions.In one embodiment of the invention, the sensor can communicate to a userlamp life status (e.g., the percentage of lamp life remaining or used)and can alert a user when a lamp is nearing its end of life and shouldbe replaced. This communication to the user may occur via a programmablepush button and one or more LEDs (light emitting diodes) located on thesensor. In another embodiment of the invention, a networked occupancysensor coupled to a display device either directly or through a lightingcontrol system can provide a user with the same and more detailed lamplife information via graphical displays and optional audible alerts.Occupancy sensors of the invention can advantageously avoid theinconvenience or dangerous and/or hazardous conditions caused by burntout lamps without wasting any lamps that may still have useful lamp liferemaining.

Occupancy sensors of the invention also can be programmed to maximizelamp life and energy savings by automatically determining and selectingthe optimal time delay from among a number of selectable time delaysavailable in the sensor. The sensor tracks each off/on transition andthe total on time of the lamp for the time delay currently programmed inthe sensor based on actual occupancy patterns sensed by the sensor overa given test period (e.g., two weeks). The sensor can also concurrentlysimulate the effects of the remaining selectable time delays on lamplife and energy savings based on the same occupancy patterns sensed bythe sensor over the given test period. Using the lamp loss algorithmmentioned above, the sensor calculates the loss of lamp life for each ofthe time delays and then, in one embodiment, automatically programs thesensor to operate with the time delay having the lowest loss of lamplife. The sensor can be further programmed to continue calculating lamploss for each of the selectable time delays over consecutive testperiods. After each test period, the sensor can be automaticallyreprogrammed with a newly determined optimal time delay should, forexample, sensed occupancy patterns change.

Occupancy sensors of the invention can therefore be advantageously usedto save energy and extend fluorescent lamp life automatically by turningoff lamps when not needed, by reducing off/on transitions with anoptimal time delay based on observed occupancy patterns, and bycontinuously monitoring occupancy patterns to ensure that the sensor isalways operating with an optimal time delay.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other advantages of the invention will be apparent uponconsideration of the following detailed description, taken inconjunction with the accompanying drawings, in which like referencecharacters refer to like parts throughout, and in which:

FIG. 1 is a simplified block diagram illustrating an occupancy sensorcontrolling fluorescent lighting according to the invention;

FIG. 2 is a block diagram of an exemplary embodiment of an occupancysensor according to the invention;

FIG. 3 is a simplified block diagram illustrating another embodiment ofan occupancy sensor controlling fluorescent lighting according to theinvention;

FIG. 4 is a known graph of lamp life versus minutes-on per start for acommon fluorescent lamp;

FIG. 5 is a flowchart of an exemplary embodiment of an algorithm fordetermining an optimal time delay for an occupancy sensor according tothe invention;

FIG. 6 illustrates the temporal relationships between actual andsimulated occupancy sensor time delays on lamp operation according tothe invention;

FIG. 7 is a graph of lamp loss versus time delay determined by thealgorithm of FIG. 5 for a first occupancy pattern according to theinvention;

FIG. 8 is a graph of lamp life and calendar life versus time delay forthe first occupancy pattern according to the invention;

FIG. 9 is a graph of lamp loss versus time delay determined by thealgorithm of FIG. 5 for a second occupancy pattern according to theinvention;

FIG. 10 is a graph of lamp life and calendar life versus time delay forthe second occupancy pattern according to the invention;

FIG. 11 is a simplified block diagram of a lighting control systemaccording to the invention;

FIG. 12 is a block diagram of an exemplary embodiment of a networkedoccupancy sensor that can be used in the system of FIG. 11 according tothe invention;

FIG. 13 is a block diagram of an exemplary embodiment of a gatewayaccording to the invention; and

FIG. 14 illustrates an exemplary embodiment of a screen display fordisplaying lamp life status according to the invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 shows a lighting control zone 100 that includes an occupancysensor 102 coupled to four fluorescent lighting units 104, eachcontaining two fluorescent lamps 106. Note that the number of lightingunits coupled to sensor 102 and the number of fluorescent lamps 106 perlighting unit is merely illustrative and can be more or less than thatshown. A lighting control zone may be, for example, an individual roomor office, a classroom, a manufacturing area, a lobby, or other definedarea whose lighting is controlled by an occupancy sensor. In thisembodiment, occupancy sensor 102 is a ceiling mounted 360° sensortypically placed in private offices, vestibules, or small rooms. Sensor102 is a line voltage sensor and has an integrated relay connected topower via Class 1 wiring 105 and to fluorescent lighting units 104 viaClass 1 wiring 103. Sensor 102 also has an integrated microcontrollerand firmware, and the ability to operate with preferably passiveinfrared (PIR) detection technology or both PIR and sound detectiontechnology.

Occupancy sensor 102 controls the on/off operation of fluorescent lamps106 based on detected occupancy. When sensor 102 senses the presence ofone or more persons, the sensor generates one or more signals that causethe relay switch of the integrated relay to close. The closed relayswitch connects power to the lighting units, which turns on the lamps.When occupancy is no longer sensed, a “last detected occupancy” timeractivates. This timer is programmed to a selectable time delay thatallows for short periods of vacancy or undetected occupancy without thelights turning off (such as, for example, when an occupant ismomentarily motionless or momentarily leaves the lighting control zoneand returns). The movement or return of the occupant resets the timer.Upon expiration of the time delay, the sensor generates one or moresignals that cause the relay switch to open (these signals are typicallyof opposite logic level or polarity than the previously generatedoccupancy signals). The open relay switch disconnects power from thelighting units, which turns off the lamps. Occupancy sensors thus saveenergy by automatically turning off lights when not needed.

FIG. 2 shows a hardware embodiment of occupancy sensor 102 in accordancewith the invention. Occupancy sensor 102 includes integratedmicrocontroller 210, PIR detector 211, optional sound detector(microphone) 212, optional daylight detector (photocell) 213,programmable push button 214, LED 220, H-bridge #1, optional H-bridge#2, relay #1, optional relay #2, and optional dimming outputs #1 and #2(for use with dimmable lighting ballasts and daylight detector 213).Occupancy sensor 102 can be programmed to operate with either PIRdetection or both PIR and sound detection for rooms or areas that mayhave obstructions. (The PIR and sound detection technology may be thesame as that disclosed in, for example, U.S. Pat. No. 5,701,117, whichis hereby incorporated by reference). The H-bridges allow the sensors tothrow the relays in either direction. That is, the H-bridges arecircuits that allow current to pass in either direction (i.e., eitherpolarity) through the relay coil to allow the relay to switch in eitherdirection. Microcontroller 210, which is operative to execute softwareand/or firmware, is preferably a Texas Instruments MSP430F1132, andpreferably includes one or more counters and registers and canfunctionally implement various timers.

The invention can include other types of occupancy sensors withdifferent sensing capabilities in order to provide occupancy detectionfor rooms and areas having a wide variety of characteristics andconfigurations. The different types of sensors include ceiling mountedextended range 360° sensors for placement in large rooms or areas; highbay 360° sensors for placement in areas with high ceilings such aswarehouses and gymnasiums; corner or ceiling mounted wide view sensorsfor placement in areas such as classrooms; and wall or ceiling mountedhallway sensors for placement in long narrow areas such as hallways orcorridors. U.S. Pat. Nos. 6,215,398 and 6,304,180 each discloseoccupancy sensing technologies that may be used in the occupancy sensorsof the invention and are thus hereby incorporated by reference. Alloccupancy sensors of the invention have integrated microcontrollers andfirmware. Occupancy sensors of the invention may be connected to otherdevices such as power packs/supplies, wall units, and daylight sensors,and multiple occupancy sensors may be used in the same lighting controlzone to provide coverage for oddly shaped rooms or large open areas.

Note that the various embodiments of occupancy sensors that can be usedwith the invention do not require all of the sensing and outputcomponents shown in FIG. 2. For example, some sensors may not haverelays (as described below in conjunction with FIG. 3) or only onerelay. Other sensors may not have dimming outputs or only one dimmingoutput. While still other sensors may not have daylight detector(photocell) 213, PIR detector 211, or sound detector (microphone) 212.

Occupancy sensors of the invention may operate with low voltage insteadof line voltage (sensor 102 operates with line voltage). Low voltagesensors do not have a relay and thus communicate with relays locatedelsewhere within the lighting control zone. FIG. 3 shows a lightingcontrol zone 300 that includes a low voltage occupancy sensor 302coupled to a power supply/relay 301 via low voltage white wire 307.Power supply/relay 301 is coupled to power via Class 1 wiring 305 and tofour fluorescent lighting units 304 via Class 1 wiring 303. Eachlighting unit 304 contains two fluorescent lamps 306. Note again thatthe number of lighting units coupled to power/supply relay 301 and thenumber of fluorescent lamps 306 per lighting unit is merely illustrativeand can be more or less than that shown. Note also that powersupply/relay 301 may be coupled to other low voltage occupancy sensors(not shown) in control zone 300. Sensor 302 includes at least amicrocontroller, a preferably PIR detector (e.g., PIR detector 211), aprogrammable push button (e.g., push button 214), an LED (e.g., LED220), and a white wire signal driver. Sensor 302 receives power frompower supply/relay 301 via a low voltage connection and communicatesoccupancy information to power supply/relay 301 via white wire 307. Thatis, when occupancy is detected by sensor 302 (or any other sensorcoupled to power supply/relay 301 via white wire 307), sensor 302 drivesthe white wire typically high (unless negative logic signaling is used),which causes power supply/relay 301 to close its relay switch. Theclosed relay switch connects power to the lighting units, which turns onthe lamps. Other devices coupled to the white wire can sense the stateof the white wire (and thus occupancy) and accordingly perform otherassociated processes (e.g., enable optional sound detectors). Theremaining functionality of occupancy sensor 302, and in particularoperation of a “last detected occupancy” timer, is identical or at leastsubstantially identical to occupancy sensor 102.

In other embodiments of the invention, daylight sensing can be usedjointly with occupancy sensing to achieve even greater energy savings.Daylight sensing may be provided by a separate daylight sensor, or theoccupancy sensor may have built in daylight sensing capability such asprovided by optional daylight detector (photocell) 213. Lighting controldecisions may be made using occupancy as the primary factor and daylightas the secondary factor as follows:

-   -   Occupancy detected and insufficient daylight: lights on;    -   Occupancy detected and sufficient daylight: lights off;    -   No occupancy detected and insufficient daylight: lights off; and    -   No occupancy detected and sufficient daylight: lights off;

Fluorescent lamps, which are commonly used in many types of commercial,institutional, and industrial buildings, are gas-discharge lamps thatuse electricity to excite mercury vapor. The excited mercury atomsproduce short-wave ultraviolet light that causes a phosphor tofluoresce, producing visible light. Fluorescent lamps require a ballastto regulate the flow of electrical power through the lamp. Although theinitial cost of fluorescent lamps is higher than that of incandescentlamps, fluorescent lamps convert electrical power into useful light moreefficiently, and thus operate at lower energy costs than incandescentlamps.

The lamp life of a fluorescent lamp, usually expressed in terms ofoperating hours, is affected predominately by three operating factors.The first is the amount of time the lamp is actually on, which isdependent on the structural integrity of the lamp's tungsten coil and onthe electron-emissive coating of the lamp's filament. Theelectron-emissive coating evaporates while the lamp is on. The secondfactor is the number of times a lamp is turned on. Each off/ontransition causes a quantity of the coating to be dislodged from thecathode. The third factor is the minimum time the lamp is left on.Fluorescent lamps require the presence of a certain amount of freebarium in order to have ignitions that do not damage the tungsten coil.Free barium is released from the emitter material of the lamp while thelamp is on. If a lamp is not on long enough after each off/ontransition, enough free barium is not released and thus will not bepresent for the next ignition. The tungsten coil is then in danger ofcracking or breaking, which will cause the lamp to fail.

The manner in which the lamp is operated determines which of the threefactors is predominate. If a lamp is turned off and on very infrequently(long on times per start), the amount of time the lamp is on becomes thepredominate lamp loss factor. If the lamp is turned off and on morefrequently (short on times per start), the number of off/on transitionsbecomes the predominate lamp loss factor. And if the lamp is turned onand off below the threshold for allowing enough free barium to bereleased, increasing the likelihood of damage to the tungsten coil, theshort on times become the predominate lamp loss factor.

Fluorescent lamp manufacturers publish “lamp life versus minutes perstart” graphs that account for the above lamp loss factors. The graph isa plot of lamp operating hours versus minutes that the lamp is on aftereach start (off/on transition). FIG. 4 shows such a graph for a commonT8 fluorescent lamp. Note that the longer the lamp is on after eachoff/on transition, the higher the lamp's operating hours. Conversely,the shorter the lamp is on after each off/on transition, the lower thelamp's operating hours. Compare the T8's lamp life of 30,000 hours whenleft on for 700 minutes (about 11.7 hours) after each off/on transitionversus a lamp life of only 5,000 hours when left on for only 15 minutesafter each off/on transition. Lamp life significantly decreases as thefrequency of off/on switching increases. In other words, turningfluorescent lamps off and on excessively, dramatically shortens lamplife either from the off/on transitions themselves and/or damage to thetungsten coil.

To substantially eliminate the possibility of the tungsten coil crackingor breaking because of an insufficient amount of free barium, occupancysensors of the invention have a user programmable “required on-timedelay” setting. A “lamp on time” timer implemented in the firmware ofthe microcontroller in the sensor tracks how long the lamp is on andresets whenever the lamp is turned off. The “required on-time delay”setting prevents the sensor from turning off the lamp until the value ofthe “lamp on time” timer meets this setting regardless of occupancy. The“required on-time delay” is separate from, and overrides the sensor'sprogrammable “last detected occupancy” time delay when both delays areactive concurrently. (Recall that the “last detected occupancy” timedelay allows for short periods of vacancy and undetected occupancywithout the lights turning off). Both delays may be active concurrentlywhen, for example, a person enters a room causing the lamps to turn onand then leaves the room a few moments later. The “required on-timedelay” will force the lamps to stay on beyond the expiration of the“last detected occupancy” time delay if the “required on-time delay” islonger by at least those few moments of detected occupancy. The requiredon-time delay forces the lamp to stay on long enough after each off/ontransition to ensure that enough free barium is released for the nextoff/on transition, thus avoiding damage to the tungsten coil andpremature lamp failure. The value of the required on-time delay dependson the type of lamp and ballast combination used, because eachcombination has different performance characteristics that depend onswitching frequency. For example, if an instant start ballast is used,the required on-time delay may be 30 minutes. If a programmed startballast is used, the value may be 15 minutes. The sensor can beprogrammed with this delay via, for example, the sensor's push button214 or, in other embodiments discussed further below, remotely usingcomputer processing devices coupled to the sensor. Once this minimumrequired on time is met, the other two lamp loss factors, the number ofoff/on transitions and the total amount of lamp on time, become thepredominate operating factors affecting lamp life.

Because energy usage is also a cost consideration in fluorescent lampoperation, maximizing lamp life alone by simply leaving the lamps on forlong periods of time may not be the obvious solution that the graph ofFIG. 4 seems to indicate unless, of course, a particular lightingcontrol zone covers, for example, a windowless continuously occupiedarea that requires constant lighting. For those lighting control zonesthat do not need lamps to be on constantly, the benefit of longer lamplife obtained from keeping the lamps on for long periods of time may beoffset by increased energy cost—the longer a lamp is on, the higher theenergy cost. However, the benefit of turning off lamps when not neededalso needs to be weighed against lamp loss caused by an increased numberof off/on transitions resulting from the lamps being turned off moreoften.

FIG. 5 shows a flowchart of one embodiment of an algorithm that canmaximize lamp life and energy savings according to the invention.Algorithm 500 can be implemented in software or firmware or combinationsof both and can be executed by an occupancy sensor of the invention suchas occupancy sensors 102 or 302. Algorithm 500 weighs three factorsbased on the lamp's actual usage to automatically determine an optimaltime delay from among a number of selectable time delays available for agiven occupancy sensor. The lamp's usage depends on how the lightingcontrol zone is normally occupied (i.e., the control zone's occupancypattern). The three factors are lamp loss while the lamp is on, lamploss from the number of off/on transitions, and energy usage while thelamp is on. The first two factors are dependent on the types of ballastand lamp used, and the third is dependent on the relative value a userplaces on saving energy versus saving lamp life. If saving energy is nota concern, this factor can be set to zero and the algorithm willoptimize the time delay based solely on lamp life savings. If energysavings is weighed as a factor, energy usage during lamp-on time iscounted as a negative, equivalent to loss of lamp life. That is, thetotal lamp life lost for each lamp-on time period is calculated and thenan additional weighted amount of lost lamp life is added to account forenergy usage. The amount of weighting is set by the user and should bedependent on the relative costs of powering the lamp versus replacingthe lamp.

Algorithm 500 automatically determines the optimal time delay byadvantageously calculating in real time the loss of lamp life based onthe actual occupancy pattern observed by the sensor and on the actual“last detected occupancy” time delay programmed in the sensor (which maybe, for example, the factory default setting). Algorithm 500 alsoconcurrently calculates in real time the loss of lamp life and energyusage for each of the selectable time delays to which the sensor couldbe programmed. That is, the algorithm concurrently simulates the effectof each selectable time delay on lamp life and energy usage as if thesensor were respectively programmed to these time delays. The result isan estimate of the loss of lamp life and energy usage for each of theavailable time delays. Algorithm 500 then chooses the time delay thatresults in the optimal combination of low loss of lamp life and lowenergy usage in accordance with the relative weighting of these factors.

Algorithm 500 can also provide a user with statistics relevant to thelamp's expected lifetime based on the lamp's current “last detectedoccupancy” time delay setting and actual operation as controlled by thesensor. The lamp loss calculated by algorithm 500 is preferably storedin the sensor's microcontroller and can be provided to the user in theform of percent of lamp life used or percent of lamp life remaining viathe push button and LED or a display device (described further below).This allows the user to judge when lamps should be replaced based onactual usage of the lamps. Along with the loss estimate, the totalnumber of off/on transitions and the total on time are also preferablystored in the sensor's microcontroller and can be provided to the user.When the lamps are replaced, this information can easily be reset totrack the operation of the new lamps.

As shown in FIG. 5, algorithm 500 begins by setting the length of a testperiod at block 530. For example, the test period may be two weeks.During this period, the occupancy sensor functions normally with itsprogrammed (e.g., default) “last detected occupancy” time delay, whichmay be, for example, 15 minutes. Delay time settings representing eachof the selectable time delays are also maintained in the sensor duringthis period to simulate the functionality of the selectable time delaysgiven the sensed occupancy conditions. Data is updated in real timebased on the performance of each of the possible time delays. At theconclusion of the test period, the resulting data is used to determinethe optimal time delay. The sensor can be programmed to continueupdating the existing data for a subsequent test period. At theconclusion of the subsequent test period, the data is evaluated and adifferent optimal time delay may be chosen if indicated by the data.This cycle of further refining the data can continue for the life of thesensor or until the user resets the stored history, in which case thealgorithm can begin anew.

At block 532, an off/on counter and a total lamp loss register are setto zero to initialize the algorithm.

At block 534, the off/on counter is incremented each time the lamp turnson.

At block 536, the loss of lamp life resulting from each off/ontransition is calculated using Equation 1.LossFromStarts=Starts×A  Equation 1:

Constant A represents the loss per start for a given lamp/ballastcombination and is described in more detail further below. Loss isdefined as the fraction of the total loss available. Equation 1 can beredefined as necessary to include any factor that may affect the amountof loss for a given start and thus may contain any number of constants.

At block 538, the “lamp on time” timer in the occupancy sensor keepstrack of the time the lamp is on until the lamp turns off (i.e., whileoccupancy is sensed and for the duration of the “last detectedoccupancy” time delay programmed in the sensor).

At block 540, algorithm 500 uses Equations 2 and 3 below to calculatelosses that occurred while the lamp was on. As in Equation 1, Equations2 and 3 can be redefined as necessary to include any factor that mayaffect the cumulative loss and thus may contain any number of constants.Note that the rate of loss decreases as the length of time the lamp ison increases. Constant B represents the initial instantaneous loss rategiven a particular lamp/ballast combination. Constant C represents therate of change in the instantaneous loss and is also dependent on theparticular lamp/ballast combination. (Constants B and C are describedmore fully below.) Equation 2 is only applied until the instantaneousloss rate reaches zero as defined by Equation 3.

${{Equation}\mspace{14mu} 2\text{:}\mspace{14mu}{CumulativeLoss}} = {{(B){TimeOn}} - {\left( \frac{C}{2} \right){TimeOn}^{2}}}$${{Equation}\mspace{14mu} 3\text{:}\mspace{14mu}{InstLoss}} = {{\frac{\mathbb{d}}{\mathbb{d}t}\left\lbrack {{(B){TimeOn}} - {\left( \frac{C}{2} \right){TimeOn}^{2}}} \right\rbrack} = {(B) - {(C){TimeOn}}}}$

At block 542, the total loss for a first “event,” which is defined as astart (off/on transition) followed by a discrete period of lamp on time,is summed using Equation 4.

${{Equation}\mspace{14mu} 4\text{:}\mspace{14mu}{LossFromEvent}} = {A + {(B){TimeOn}} - {\left( \frac{C}{2} \right){TimeOn}^{2}}}$

Constants A, B, and C used in Equations 1-4 are based on the type oflamp/ballast combination used in the lighting unit. The lamp life vs.time-on-per-cycle graphs published by lamp and ballast manufacturers arebased on lamps that are cycled at different rates within a range ofrates, where each rate is applied repeatedly until the lamp burns out.This situation is different than actual lamp usage where thetime-on-per-cycle typically varies widely throughout the life of thelamp. Because each time-on-per-cycle is the same in the published data,the loss from each cycle can be assumed to be the same. Therefore,because the loss from each cycle is an equal fraction of the total lossavailable, the total number of cycles that will occur for a giventime-on-per-cycle can be determined as shown in Equation 5.

${{Equation}\mspace{14mu} 5\text{:}\mspace{14mu}{TotalCycles}} = \frac{1}{LossFromCycle}$

The total number of cycles is then multiplied by the time-on-per-cycleto determine the total lamp life as shown in Equation 6.

${{Equation}\mspace{14mu} 6\text{:}\mspace{14mu}{LampLife}} = {\frac{{TimeOn}\text{/}{Cycle}}{LossFromCycle} = \frac{{TimeOn}\text{/}{Cycle}}{A + {(B)\left( {{TimeOn}\text{/}{Cycle}} \right)} - {\left( \frac{C}{2} \right)\left( {{TimeOn}\text{/}{Cycle}} \right)^{2}}}}$

From Equation 6, which relates the time-on-per-cycle to lamp life,values for the constants A, B and C can be found such that the resultsclosely match the data in the lamp life vs. time-on-per-cycle chartsprovided by manufacturers. One method to determine constants A, B and Cis via an optimization program that optimizes the constants so the errorbetween the formula results and the manufacturers' data is minimized.The program starts with initial values for constants A, B and C andcalculates lamp life using Equation 6 for each of the supplied datapoints. The difference between the lamp life predicted by Equation 6 andthe manufacturers' data is considered the error. The program thenrandomly increments or decrements each constant and rechecks the error.If the error decreases, the new value is kept and the process repeats.The resulting values for constants A, B and C are values that theprogram has determined to have the least collective error relative tothe manufacturer's data. Table 1 below shows the resulting values ofconstants A, B and C for several representative lamp/ballastcombinations. Using Equation 6 and the constants below, the calculatedlamp life for each of the lamp/ballast combinations in Table 1 veryclosely matches the actual lamp life data published by themanufacturers.

TABLE 1 C A B (Loss/ Ballast Lamp (Loss) (Loss/kHr) kHr²) Manufacturer AManufacturer B 1.15E−05 0.0396 1.2000 Instant Start Standard LampManufacturer A Manufacturer B 1.46E−05 0.0291 0.4240 Instant StartDeluxe Lamp Manufacturer A Manufacturer B 4.68E−06 0.0313 0.6630 ProgramStart Standard Lamp Manufacturer A Manufacturer B 5.39E−06 0.0260 0.0228Program Start Deluxe Lamp Manufacturer C Manufacturer D 4.50E−05 0.05603.0300 Instant Start Standard Lamp Manufacturer C Manufacturer D5.10E−05 0.0397 0.9300 Instant Start Deluxe Lamp Manufacturer CManufacturer D 1.50E−05 0.0484 2.3280 Program Start Standard LampManufacturer C Manufacturer D 1.00E−05 0.0400 1.2629 Program StartDeluxe Lamp

As algorithm 500 is applied to the actual operation of the lamp ascontrolled by the actual “last detected occupancy” time delay programmedin the sensor, algorithm 500 is also applied concurrently to a simulatedoperation of the lamp as would be controlled by each of the availableselectable time delays (i.e., the selectable time delays other than theactual time delay programmed in the sensor). At block 538X, respectivetimers implemented in the firmware of the microcontroller in theoccupancy sensor keep track of the time the lamp is on or would be onfor each of the “simulated” selectable time delays. These timers tracklamp on time through the full duration of the respective simulated timedelays, even if the actual lamp has turned off because of expiration ofthe actual programmed time delay. Then, as each simulated time delayexpires, algorithm 500 uses the respective value of the timer associatedwith that simulated time delay to calculate the lamp loss for thatsimulated time delay.

FIG. 6 illustrates the simulated time delays in relation to the actualtime delay. Actual time delay 660 and simulated time delays 662, 664,and 666 begin at the same time 661 of last detected occupancy. Forsimulated time delay 662, algorithm 500 will continue tracking lamp ontime as if the lamp never turned off and will not count off/ontransition 663 for that simulated delay time, because the length ofsimulated time delay 662 extends beyond both the actual time delay 660and the actual occurrence of the next off/on transition 663. Thus, thelamp would not have turned off and then back on again had simulated timedelay 662 been programmed in the sensor. Similarly, because simulatedtime delay 664 is longer than actual time delay 660, but expires beforethe actual occurrence of next off/on transition 663, algorithm 500 willcalculate the simulated time delay's lamp loss with the shorter off time665. And lastly, because simulated time delay 666 is shorter than actualtime delay 660, algorithm 500 will not treat the on time difference 667between simulated time delay 666 and actual time delay 660 as lamp ontime against simulated time delay 666, because the lamp would haveturned off had simulated time delay 666 been programmed in the sensor.

Returning to FIG. 5, block 544 determines whether the test period hasended. If not, the algorithm returns to block 534 and awaits anotheroff/on transition, whereupon blocks 536, 538, and 540 perform the samefunctions for this next event.

The calculation at block 542, however, now expands to also calculate thetotal cumulative loss from all observed events. That is, algorithm 500calculates at block 542 the loss from each event as it occurs usingEquation 4 and then sums the result with the previous total losses usingEquation 7 below to keep a running total of the cumulative lamp lossfrom the series of observed off/on transitions and accompanying lamp ontimes.

${{Equation}\mspace{14mu} 7\text{:}\mspace{14mu}{TotalLos}} = {\sum\limits_{i = 1}^{n}\;{LosFromEvent}_{i}}$

When the test period ends, the total cumulated lamp loss calculatedduring the test period for each selectable time delay, including thesimulated time delays and the actual time delay programmed in thesensor, are compared at block 546 to determine which time delay has thelowest lamp loss. If the occupancy sensor has been optionally programmedto only report, at this point, the results of the analysis to a user,algorithm 500 may await a reply from the user before proceeding further.

Preferably, however, the occupancy sensor is programmed to automaticallyreplace at block 548 the currently programmed time delay with theoptimal time delay most recently determined to have the lowestcalculated lamp loss.

In alternative embodiments of the invention, the occupancy sensor has asecond and/or a third time delay setting in addition to the programmabletime delay setting. The programmable time delay setting is automaticallyset internally by algorithm 500 to the most recently determined optimaltime delay, whereas the second and third time delay settings have valuesthat are user selectable. If a user sets the second time delay, the lampwill not be permitted to turn off until the “last detected occupancy”timer exceeds both the programmable second time delays. If a user setsthe third time delay, the lamp will not turn off until the “lastdetected occupancy” timer exceeds the third time delay regardless of thevalue of the programmable time delay. In other words, the second andthird programmable time delay settings override the internally setprogrammable time delay setting when the programmable time delay iseither less than the second time delay or more than the third timedelay.

To summarize the operation of the occupancy sensor with respect to thevarious time delays described above, in a first embodiment, lamps willnot turn off until they have been on for the required on-time delay andoccupancy has not been detected for the full duration of the programmedoptimal “last detected occupancy” time delay. In an alternativeembodiment, the lamps will not turn off until the lamps have been on forthe required on-time delay and occupancy has not been detected for thelonger of the full duration of the programmed optimal time delay or theuser programmed second time delay. In the same or another alternativeembodiment, the lamps will not turn off until they have been on for therequired on-time delay and occupancy has not been detected for theshorter of the full duration of the programmed optimal time delay or theuser programmed third time delay.

The occupancy sensor is also preferably programmed to automaticallyrepeat algorithm 500 for another test period. At block 550, userprogramming indicates whether algorithm 500 will repeat with cumulativelamp loss data or will repeat anew with fresh data, such as, forexample, when a new lamp is installed. If algorithm 500 is to repeatanew, control returns to block 532, where the off/on counter and totallamp loss register are reset to zero. If algorithm 500 is to repeat withcumulative data, control returns to block 534, where the next off/ontransition is awaited. Note that algorithm 500 uses the cumulative lamploss data to also continue updating the lamp's current lamp life status.A third option (not shown in FIG. 5) is to repeat the algorithm withcumulative data, but to weigh it less in the determination of an optimaltime delay for the current test period. A user can program the weightingof the cumulative data. This prevents, for example, previous outdatedoccupancy patterns from incorrectly influencing the calculations, suchas, for example, when a file room is converted into an office. A usercan set the weighting of the cumulative data to zero, which preventsthat data from influencing the current calculations, but still allowsthe cumulative data to be used to determine remaining lamp life.

Table 2 and FIG. 7 show an example of lamp losses calculated byalgorithm 500 for a plurality of selectable time delays based on alighting control zone having an occupancy pattern characterized byrelatively short unoccupied periods that average less then ten minutesthroughout the day followed by long unoccupied periods overnight. Asshown, the results of algorithm 500 indicate that the optimal time delayfor this occupancy pattern is 10 minutes—a time delay long enough toprevent the lights from turning off during the short unoccupied periodsduring the day, but still short enough to allow the lights to turn offwithout wasting unnecessary on time during the long unoccupied periodsovernight. Note that the shortest time delay (5 minutes) incurs lamploss predominately from the excessive starts (off/on transitions), whilethe longest time delays (30+ minutes) incur lamp loss predominately fromthe excessive on times without any reduction in the number of starts.

TABLE 2 Time On Fraction Of Lamp Time Delay Starts (Hours) Life Lost  5Minutes 44 77.7 0.0033966 10 Minutes 27 77.2 0.0030761 15 Minutes 2779.3 0.0031505 20 Minutes 24 81.2 0.0031680 25 Minutes 23 83.1 0.003219930 Minutes 22 84.9 0.0032666 35 Minutes 22 86.7 0.0033305 40 Minutes 2288.6 0.0033942

FIG. 8 shows the effect of the calculated lamp losses per time delayabove on lamp life 880 and calendar life 882 of the lamp. Although thenumber of operating hours increases just slightly with longer timedelays for lamp life 880, actual calendar life 882 benefits from theshorter, optimal time delay of 10 minutes, which corresponds to about423 weeks of calendar life versus 387 weeks of calendar life for a 40minute time delay. Also note from FIG. 4 that the lamp life of about25,000 hours resulting from the 10 minute time delay is equivalent to aT8 fluorescent lamp cycled at about 275 minutes (about 4.6 hours) perstart. Algorithm 500 has thus advantageously maximized energy savingswithout sacrificing lamp life.

Table 3 and FIG. 9 show a second example of lamp losses calculated byalgorithm 500 for a plurality of selectable time delays. In thisexample, the lighting control zone is unoccupied for periods averagingabout fifteen minutes throughout the day. As shown, the results ofalgorithm 500 indicate that the optimal time delay for this occupancypattern is 20 minutes—a time delay that will prevent the lamps fromturning off during those unoccupied fifteen minute periods. The resultsindicate that the lamp loss caused by the lamps staying on during thoseunoccupied fifteen minute periods is less than the lamp loss caused bythe increased number of starts (off/on transitions) that would resultfrom a shorter time delay.

TABLE 3 Time On Fraction Of Lamp Time Delay Starts (Hours) Life Lost  5Minutes 50 73.3 0.0033523 10 Minutes 31 75.2 0.0030791 15 Minutes 2776.2 0.0030344 20 Minutes 22 77.2 0.0029656 25 Minutes 22 78.9 0.003024330 Minutes 21 80.6 0.0030707 35 Minutes 21 82.3 0.0031317 40 Minutes 2184.1 0.0031925

FIG. 10 shows the effect of the calculated lamp losses per time delayfor the second example on the lamp life and calendar life of the lamp.Again, although the number of operating hours increases just slightlywith longer time delays for lamp life 1080, actual calendar life 1082benefits from the shorter, optimal time delay of 20 minutes, whichcorresponds to about 443 weeks of calendar life versus 411 weeks ofcalendar life for a 40 minute time delay.

Lamp life status and related information can be communicated to a userby occupancy sensors 102 and 302 via their programmable push buttons andLEDs. A user can request the percent of lamp life used, the number ofoff/on transitions, and the number of lamp on hours by pushing the pushbutton a specified number of times to retrieve a given piece ofinformation. The information is then fed back to the user throughconsecutive blinks of the LED. For example, to retrieve the percent oflamp life used in one embodiment, the user presses the push button threetimes. The first digit of the percent of lamp life used is communicatedto the user by a number of consecutive LED blinks. After a pause, thesecond digit is communicated in the same manner. A value of zero for adigit is fed back via a short sequence of rapid flashing of the LED.After the percent is fed back to the user, a long pause occurs and thecycle may repeat a number of times (e.g., three times). Thus, if lamplife used is 60%, the LED first blinks six times followed by a pause andthen a short sequence of rapid flashing. Similarly, to retrieve thenumber of off/on transitions, the push button may need to be pressed,for example, four times. To retrieve the number of lamp on hours, thepush button may need to be pressed, for example, five times. To shortenthe information that needs to be communicated, the number of off/ontransitions may be represented as thousands of starts and the number oflamp on hours may be represented in thousands of hours. Lamp lifeinformation and the collected time delay data can also be cleared fromthe sensor by a respective series of push button commands.

Occupancy sensors of the invention may also be programmed to alert auser that lamps should be replaced. For example, the sensor'smicrocontroller can be programmed to cause the sensor's LED to blinkslowly and continuously when lamp loss exceeds a pre-set amount, suchas, for example, 99%. Alternatively or additionally, the sensor mayprovide an audible alert when, for example, lamp loss exceeds a pre-setamount and the push button is pressed (regardless of the reason forpressing the push button), thus alerting a user with sound that thelamps controlled by the sensor should be replaced.

FIG. 11 shows another embodiment of the invention. Networked occupancysensor 1102 is coupled to various devices capable of either programmingsensor 1102, displaying information received from sensor 1102, and/orstoring data received from sensor 1102. Occupancy sensor 1102 is coupleddirectly to a stand-alone personal computer 1122 and a gateway 1124 viapreferably standard category 5 (“CAT-5”) cabling 1105. Gateway 1124 isin turn coupled to a preferably Ethernet local area network (“LAN”)1125, to which host computer 1126 and handheld computer device 1128 areboth coupled. Sensor 1102, which is operative to execute software orfirmware embodying algorithm 500, transmits information and data eitherautomatically or as requested by a user that may include the sensor'scurrent settings and operational status and the associated lamp's statusincluding, for example, remaining lamp life, as tracked by the sensorand calculated by algorithm 500. Occupancy sensor 1102 may be programmedby, and may have information/data transmitted from it displayed byand/or stored in personal computer 1122, gateway 1124, host computer1126, and/or handheld computer device 1128.

FIG. 12 shows a hardware embodiment of networked occupancy sensor 1102in accordance with the invention. Occupancy sensor 1102 includesintegrated microcontroller 1210, PIR detector 1211, optional sounddetector (microphone) 1212, optional daylight detector (photocell) 1213,programmable push button 1214, connector ports 1215 a and 1215 b,transceiver 1216, voltage regulators 1217 and 1218, reset chip 1219, LED1220, H-bridge #1, optional H-bridge #2, relay #1, optional relay #2,and optional dimming outputs #1 and #2 (for use with dimmable lightingballasts and daylight detector 1213). Occupancy sensor 1102 can beprogrammed to operate with either PIR detection or both PIR and sounddetection. (The PIR and sound detection technology may be the same asthat disclosed in, for example, U.S. Pat. No. 5,701,117). Reset chip1219 monitors the preferably 3.3 volts from regulator 1218 and disablesthe microcontroller via a reset pin if the voltage falls below a setlevel, such as, for example, 2.8 volts. This prevents themicrocontroller from possibly malfunctioning or locking up should itsinput voltage drop below a certain level. The H-bridges allow thesensors to throw the relays in either direction. That is, the H-bridgesare circuits that allow current to pass in either direction (i.e.,either polarity) through the relay coil to allow the rely to switch ineither direction. Microcontroller 1210, which is operative to executesoftware and/or firmware, is preferably a Texas Instruments MSP430F2272,transceiver 1216 is preferably an RS-485 Analog Devices ADM3493, andreset chip 1219 is preferably a TelCom Semiconductor TC54VN27 voltagedetector. Occupancy sensor 1102 may be a line voltage sensor (having atleast one relay) coupled directly to lighting units or a low voltagesensor (having neither relay #1 nor relay #2) coupled to a powersupply/relay device, which is coupled to lighting units.

As with occupancy sensors 102 and 302, the invention can include othertypes of networked occupancy sensors having different sensingcapabilities in order to provide occupancy detection for rooms and areashaving a wide variety of characteristics and configurations. Thedifferent types include ceiling mounted extended range 360° sensors forplacement in large rooms or areas; high bay 360° sensors for placementin areas with high ceilings such as warehouses and gymnasiums; corner orceiling mounted wide view sensors for placement in areas such asclassrooms; and wall or ceiling mounted hallway sensors for placement inlong narrow areas such as hallways or corridors. U.S. Pat. Nos.6,215,398 and 6,304,180 each disclose occupancy sensing technologiesthat may be used in networked occupancy sensors of the invention. Allnetworked occupancy sensors of the invention have integratedmicrocontrollers and firmware and the ability to communicate eitherdirectly or via a network to a display device, and can be programmedeither locally via a push button on the sensor or remotely via othercomputer processing devices. Occupancy sensors of the invention may beconnected to other devices such as power packs, wall units, and daylightsensors using preferably CAT-5 cabling, and may operate with low voltageor line voltage. Low voltage sensors do not have a relay and thuscommunicate with relays located elsewhere within the lighting controlzone. Multiple occupancy sensors can be used in the same zone to providecoverage for oddly shaped rooms or large open areas. Note that thevarious embodiments of occupancy sensors that can be used with theinvention may not require all of the sensing and output components shownin FIG. 12. For example, some sensors may not have relays or only onerelay. Other sensors may not have dimming outputs or only one dimmingoutput. While still other sensors may not have daylight detector(photocell) 1213, PIR detector 1211, or sound detector (microphone)1212.

Networked occupancy sensor 1102 may be part of an independentlocally-operated lighting control zone coupled directly to a stand-alonecomputer and/or one or more other devices having processing and/ordisplay capabilities. Alternatively, occupancy sensor 1102 may be partof a lighting control system 1100 as shown in FIG. 11. Lighting controlsystem 1100 has three main components: devices, lighting control zones,and a network backbone. Devices include, for example, occupancy sensors,daylight sensors, power supply/relay units, and wall switch units. Eachdevice has the ability to communicate over the network backbone andpreferably has an integrated microcontroller and firmware and RJ-45style connector ports. The lighting control system may be controlled viahost computer 1126 executing Web-based control software. The lightingcontrol system may also be controlled via a gateway (e.g., gateway 1124,discussed in more detail below) or a laptop or other computer,workstation, or handheld device (e.g., handheld computer device 1128)that can remotely access the Web-based control software. Device andcommunication power may be delivered via CAT-5 cabling connected to adevice's RJ-45 connector port, or may be connected directly from a powersupply to a device's power terminal connector, if so equipped.

Gateway 1124 is part of the network backbone of lighting control system1100. Gateway 1124 transports and routes information between multiplelighting control zones (not shown) and the Web-based control software.Gateway 1124 interconnects multiple lighting control zones preferablyusing CAT-5 cabling and communicates over LAN 1125 using standardEthernet and TCP/IP communication protocols. Gateway 1124 is preferablya 2-gang low voltage wall unit that mounts to a 2-gang junction box, andhas a LAN connector port and several preferably RJ-45 connector portsfor connection to downstream lighting control zones via CAT-5 cabling.Gateway 1124 acts both as a communication access point for the system'scontrol software and as a local control device for accessing anydownstream device including, for example, occupancy sensor 1102. Gateway1124 has a display screen 1127, which is preferably a backlit LCD(liquid crystal display) screen, and control keys 1129, which may beconventional keypad devices. Using the display screen and control keys,users can request and display various lamp life data and statistics andoccupancy sensor settings and status.

FIG. 13 shows a hardware embodiment of gateway 1124 that can be used toexecute software or firmware embodying algorithm 500 and/or that canstore lamp and occupancy related information/data downloaded fromnetworked occupancy sensor 1102 in accordance with the invention.Gateway 1124 includes a microprocessor 1310, a memory board containingmemory devices 1371, 1373, and 1375, signal microcontroller 1376, CPUclock 1377, LAN clock 1378, LAN transceiver 1379A,B, three transceivers1316 a-c, switching voltage regulator 1318, and display/driver 1323.Microprocessor 1310 is preferably an 8-bit Rabbit 3000 microprocessorfrom Rabbit Semiconductor. Microprocessor 1310 is operative to executesoftware or firmware embodying algorithm 500 and preferably has hardwareand/or software support for TCP/IP, IrDA, SDLC/HDLC, Async, SPI, andI2C; 56+ digital I/O; and six serial ports. The application codeexecuted by the microprocessor comprises API calls and hardware driversto implement most TCP/IP protocols. Memory device 1371 is preferably a512 KB flash memory used to store the application code and gatewayconfiguration block parameters. Memory device 1373 is preferably a 512KB FSRAM (fast static random access memory) used by the application codeand stack software for variables and communication buffers. And memorydevice 1375 is preferably a 512 KB SRAM (static random access memory)used to store information and data received from occupancy sensor 1102and lighting control information for the lighting control zonesconnected to the gateway. CPU clock 1377 includes a main CPU oscillatorand a real-time clock oscillator. LAN clock 1378 is preferably anEthernet driver oscillator. These clocks are each individual circuitsthat provide each module with their respective operational frequency.LAN transceiver 1379A,B is preferably a 10/100 Ethernet MAC/PHY (mediaaccess control/physical layer) driver and associated magnetics,respectively. Transceivers 1316 a-c are preferably EIA 485 transceiverscoupled respectively to preferably RJ-45 connector ports. Using threeUARTs (universal asynchronous receiver/transmitters) from microprocessor1310, the gateway can interface with occupancy sensor 1102 and otherlighting control zones connected to the three connector ports. Switchingregulator 1318 is a DC/DC step-down switching regulator, anddisplay/driver 1327 is an LCD (liquid crystal display) driver displaythat may be implemented using Desintron F-STN positive display DV5520BB(132 W×64 H pixels). Display/driver 1327 includes four control keys: up1329 a, down 1329 b, right (enter) 1329 c, and left (escape) 1329 d.Microprocessor 1310 checks for any key presses and then performs anddisplays the respective action on display screen 1127.

U.S. patent application Ser. No. 12/116,185, which discloses a lightingcontrol system that includes occupancy sensors, gateways, an EthernetLAN network, lighting control software, and other components andfeatures that may be used with the invention, is incorporated herein byreference.

FIG. 14 shows an example of a screen display of lamp life status thatmay be displayed on any one of, for example, personal computer 1122,gateway 1124, host computer 1126, and/or handheld computer device 1128in accordance with the invention. Display 1400 lists the remaining lamplife of lamps located in four lighting control zones of a lightingcontrol system. An occupancy sensor of the invention located in each ofthe four lighting control zones executes software or firmware embodyingalgorithm 500. Algorithm 500 calculates the loss of lamp life for thelamps in each of the four lighting control zones based on the type oflamp/ballast combinations used and the particular occupancy patternssensed in those lighting control zones. The calculated losses, which maybe converted to percentage of lamp life remaining, are transmitted bythe four occupancy sensors to preferably a gateway, such as gateway1124, or other computer processing device that can format the receiveddata for display either on its own display screen and/or on anotherdisplay device as requested by a user. The invention advantageouslypermits, for example, a building manager to review the status of lampsand then take appropriate action as needed. As shown in FIG. 14, thelamps in zone 1 still have more than half their lamp life remaining, asdo the lamps of zones 3 and 4. However, the lamps of zone 2 are neartheir end-of-life and should soon be replaced. An optional audible alertmay accompany the display of zone 2's lamp life status. The buildingmanager can now assign maintenance personnel to replace the lamps inzone 2 before they burn out, thus avoiding any inconvenience ordangerous and/or hazardous conditions that could result from burnt outlamps.

Other information and data related to lamp usage and sensor operationcan also be displayed in accordance with the invention. For example, thegraphs of FIGS. 7-10 can be displayed to permit a user to review thedata calculated by algorithm 500. Also, the current number of off/ontransitions, total lamp on time, lamp loss per simulated and actualdelay times, settings of various delay times, and values of varioussensor timers can also be requested by a user and displayed on a displaydevice.

The software or firmware embodying algorithm 500 is not limited to beingexecuted by an occupancy sensor of the invention. Alternatively, suchsoftware or firmware can be executed by other devices having amicrocontroller, microprocessor, or computer processor of sufficientprocessing capability and memory capacity coupled to an occupancy sensorof the invention. In these cases, the occupancy sensor transmits datapertaining to occupancy, time delay status, and lamp status to thedevice executing the software or firmware embodying algorithm 500. Forexample, any one of local computer 1122, gateway 1124, host computer1126, and/or handheld computer device 1128 could execute software orfirmware embodying algorithm 500, provided they have sufficientprocessing capability and memory capacity.

Also, data gathered and/or calculated by algorithm 500 and itsassociated occupancy sensor, such as lamp loss, the total number ofoff/on transitions, the total on time of a lamp, optimal time delaysetting, etc., is not limited to being stored in the associatedoccupancy sensor, but can be alternatively downloaded and storedremotely in, for example, any one of local computer 1122, gateway 1124,host computer 1126, handheld computer device 1128, and/or otherremotely-connected computers, provided sufficient memory capacity existsin the device.

In an alternative embodiment of the invention, an occupancy sensorcontrols the on/off state of a lamp and tracks the number of off/ontransitions and the amount of time the lamp is on for a lamp it iscontrolling. The sensor includes a first timer set to a first time delaythat is operative to activate upon the sensor sensing vacancy afteroccupancy had been detected and to deactivate upon expiration of thefirst time delay, the first timer operative to prevent the sensor fromturning off the lamp upon activation of the first timer and for theduration of the first time delay. The sensor also includes a counteroperative to count the number of times the lamp turns on (i.e., theoff/on transitions), a second timer operative to activate upon the lampturning on and deactivate upon the lamp turning off, and a registeroperative to store a cumulative amount of time the lamp is on as trackedby the second timer. This information can then be used to latercalculate lamp life and energy usage of the lamp either at the sensoritself if equipped with appropriate processing capability (e.g., amicrocontroller executing appropriate firmware and/or software) orremotely at a gateway or computer executing appropriate firmware and/orsoftware. The tracked and calculated data can be provided to a user viathe push button and LED of the sensor, a display on the sensor, or adisplay device coupled to the sensor and/or the gateway or computer.

In another alternative embodiment of the invention, an occupancy sensorconcurrently calculates the number of times a lamp would turn on (i.e.,off/on transitions) and the amount of time a lamp would be on for eachof a selectable number of time delays to which the sensor could beprogrammed. That is, algorithm 500 is used to concurrently simulate theeffect of each selectable time delay on the number of starts (i.e.,off/on transitions) and the amount of lamp on time as if the sensor's“last detected occupancy” timer were respectively programmed to thesetime delays. The result is an estimate of the number of starts and theamount of lamp on time the lamp would experience for each of theselectable time delays. This information can then be used to calculatelamp life and energy usage for each of the selectable time delays. Thesimulated and calculated data can be fed back to a user via the pushbutton and LED of the sensor, a display on the sensor, or a displaydevice coupled to the sensor. This data can also be used by the sensorto automatically determine an optimal time delay for the “last detectedoccupancy” timer

In yet another alternative embodiment of the invention, an occupancysensor not controlling the on/off operation of a lamp in a lightingcontrol zone monitored by the sensor can still be used to determine anoptimal time delay setting for the “last detected occupancy” timer andto estimate loss of lamp life and/or energy usage of that lamp based onan observed occupancy sensor pattern in that lighting control zone.

The invention is also not limited to use with fluorescent lamps, but canbe used alternatively with other types of lamps provided thatappropriate lamp loss equations and lamp life data are available.

Thus it is seen that occupancy sensors that measure lamp loss areprovided. One skilled in the art will appreciate that the invention canbe practiced by other than the described embodiments, which arepresented for purposes of illustration and not of limitation, and theinvention is limited only by the following claims.

We claim:
 1. A system comprising: an occupancy sensor operative to senseoccupancy in an area; and a hardware processor coupled to the occupancysensor, the hardware processor programmed to calculate at least one of aloss of lamp life or an amount of energy used by a lamp based onoccupancy sensed by the occupancy sensor.
 2. The system of claim 1wherein the hardware processor is an integral part of the occupancysensor or a local computer, gateway, host computer, or handheld devicecoupled directly or via a network to the occupancy sensor.
 3. The systemof claim 1 further comprising a display device coupled to the hardwareprocessor, wherein: the hardware processor is operative to generate andtransmit to the display device a display of information pertaining to atleast one of the loss of lamp life, lamp life remaining, a number oftimes the lamp has turned on, a cumulative amount of time the lamp hasbeen on, or the amount of energy used by the lamp; and the displaydevice is an integral part of a local computer, gateway, host computer,or handheld device coupled directly or via a network to the hardwareprocessor.
 4. The system of claim 1 further comprising a memory,wherein: the memory is an integral part of the occupancy sensor, thehardware processor, or a local computer, gateway, host computer, orhandheld device coupled directly or via a network to the occupancysensor or the hardware processor; and data gathered by the occupancysensor or calculated by the hardware processor is stored in the memory.5. The system of claim 1 wherein the occupancy sensor has a selectabletime delay and the hardware processor is programmed to simulate on/offoperation of the lamp as if the lamp were controlled by the occupancysensor for each of a plurality of selectable time delays based onoccupancy sensed by the occupancy sensor.
 6. The system of claim 5wherein the hardware processor is further programmed to estimate a lossof lamp life or an amount of energy that would be used by the lamp foreach of the plurality of selectable time delays based on the simulatedon/off operation of the lamp for each of the plurality of selectabletime delays.
 7. The system of claim 1 wherein the hardware processor isalso programmed to: calculate remaining lamp life based on thecalculated loss of lamp life; and alert a user that the lamp is nearburnout in response to determining that the calculated remaining lamplife is less than or equal to a threshold, the hardware processorcausing: one or more light or sound components of the occupancy sensorto activate either automatically or in response to a user interactingwith the occupancy sensor; or a warning message to appear on a displaycoupled to the hardware processor.
 8. The system of claim 1 wherein thehardware processor is programmed to calculate at least one of a loss oflamp life or an amount of energy used either: as the lamp is being used;in response to receiving data that has been gathered by the occupancysensor over a period of time; or in response to a user request.
 9. Thesystem of claim 1 wherein the lamp is a fluorescent lamp.
 10. A systemcomprising: an occupancy sensor operative to sense occupancy in an area,the occupancy sensor having a selectable time delay; and a hardwareprocessor coupled to the occupancy sensor, the hardware processorprogrammed to simulate on/off operation of a lamp as if the lamp werecontrolled by the occupancy sensor for each of a plurality of selectabletime delays based on occupancy sensed by the occupancy sensor.
 11. Thesystem of claim 10 wherein the hardware processor is an integral part ofthe occupancy sensor or a local computer, gateway, host computer, orhandheld device coupled directly or via a network to the occupancysensor.
 12. The system of claim 10 wherein the hardware processor isprogrammed to simulate on/off operation of the lamp by simulating eitherthe number of times the lamp would turn on, the cumulative amount oftime the lamp would be on, or both for each of the plurality ofselectable time delays based on occupancy sensed by the occupancysensor.
 13. The system of claim 10 wherein the hardware processor isalso programmed to estimate a loss of lamp life or an amount of energythat would be used by the lamp for each of the plurality of selectabletime delays based on the simulated on/off operation of the lamp for eachof the plurality of selectable time delays.
 14. The system of claim 10further comprising a display device coupled to the hardware processor,wherein: the hardware processor is operative to generate and transmit tothe display device a display of information pertaining to the simulatedon/off operation of the lamp for each of the plurality of selectabletime delays; and the display device is an integral part of a localcomputer, gateway, host computer, or handheld device coupled directly orvia a network to the hardware processor.
 15. The system of claim 10wherein the hardware processor is also programmed to: select one of theplurality of selectable time delays based on the simulated on/offoperation of the lamp for each of the plurality of selectable timedelays; and cause the occupancy sensor to operate with the selected oneof the plurality of selectable time delays.
 16. The system of claim 10further comprising a memory, wherein: the memory is an integral part ofthe occupancy sensor, the hardware processor, or a local computer,gateway, host computer, or handheld device coupled directly or via anetwork to the occupancy sensor or the hardware processor; and occupancysensor data gathered by the occupancy sensor or simulated data or dataderived therefrom by the hardware processor is stored in the memory. 17.The system of claim 10 wherein the hardware processor is also programmedto calculate at least one of a loss of lamp life or an amount of energyused by the lamp based on occupancy sensed by the occupancy sensor. 18.The system of claim 10 wherein the lamp is a fluorescent lamp.
 19. Asystem comprising: an occupancy sensor operative to sense occupancy inan area, the occupancy sensor having a plurality of time delays, whereinat least one of the plurality of time delays is operative to run aloneand at least one of the plurality of time delays is operative to runconcurrently with at least one other of the plurality of time delays,and each of the plurality of time delays is operative to affect when theoccupancy sensor is operative to cause a lamp to turn off in response tothe occupancy sensor sensing no occupancy in the area; a hardwareprocessor coupled to the occupancy sensor, the hardware processoroperative to cause the occupancy sensor to be programmed with a valuefor at least one of the plurality of time delays, wherein the hardwareprocessor is an integral part of a local computer, gateway, hostcomputer, or handheld device coupled directly or via a network to theoccupancy sensor.
 20. The system of claim 19 wherein the plurality oftime delays comprises: a first time delay that begins running inresponse to the lamp turning on and wherein the occupancy sensor isprevented from causing the lamp to turn off until expiration of thefirst time delay; and a second time delay that begins running inresponse to the occupancy sensor sensing no occupancy after occupancyhad been sensed and wherein the occupancy sensor is prevented fromcausing the lamp to turn off until expiration of the second time delay,or expiration of the last of the first and second time delays if thefirst and second time delays are running concurrently.
 21. The system ofclaim 20 wherein the plurality of time delays further comprises at leastone of: a third time delay that begins running concurrently with thesecond time delay and wherein the occupancy sensor is prevented fromcausing the lamp to turn off until expiration of the longer of thesecond or third time delays, or expiration of the last of the first,second, and third time delays if the first, second, and third timedelays are running concurrently; and a fourth time delay that beginsrunning concurrently with the second time delay and wherein theoccupancy sensor is prevented from causing the lamp to turn off untilexpiration of the shorter of the second or fourth time delays, orexpiration of the last of the first and fourth time delays if the firstand fourth time delays are running concurrently.
 22. The system of claim19 wherein the hardware processor is operative to cause the occupancysensor to be programmed with a value for at least one of the pluralityof time delays in response to a user input or automatically in responseto executing program instructions regarding at least one of theplurality of time delays.
 23. The system of claim 19 wherein thehardware processor is programmed to calculate at least one of a loss oflamp life or an amount of energy used by the lamp based on occupancysensed by the occupancy sensor.
 24. The system of claim 19 wherein thehardware processor is programmed to simulate on/off operation of thelamp as if the lamp were controlled by the occupancy sensor for each ofa plurality of selectable time delays based on occupancy sensed by theoccupancy sensor.
 25. The system of claim 24 wherein the hardwareprocessor is further programmed to estimate a loss of lamp life or anamount of energy that would be used by the lamp for each of theplurality of selectable time delays based on the simulated on/offoperation of the lamp for each of the plurality of selectable timedelays.
 26. The system of claim 19 wherein the lamp is a fluorescentlamp.
 27. A method of controlling the on/off state of a lamp, the methodcomprising: an occupancy sensor causing a lamp to turn on in response tosensing occupancy; the occupancy sensor causing the lamp to turn off inresponse to sensing no occupancy for longer than a first period of time;and a hardware processor calculating a loss of lamp life or an amount ofenergy used by the lamp based on the occupancy sensor causing the lampto turn on and turn off.
 28. The method of claim 27 further comprisingthe hardware processor simulating the on/off operation of the lamp foreach of a plurality of selectable values for the first period of time.29. The method of claim 28 further comprising the hardware processorcausing the occupancy sensor to be programmed with one of the pluralityof selectable values for the first period of time based on thesimulating of the on/off operation of the lamp.
 30. The method of claim27 further comprising issuing an alert indicating that the lamp shouldbe replaced based on the calculated loss of lamp life.
 31. The method ofclaim 27 wherein the lamp is a fluorescent lamp.